<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class ActionLog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('action_log', function (Blueprint $table) {
             $table->engine = 'InnoDB';
             $table->charset = 'utf8';
             $table->collation = 'utf8_unicode_ci';
            // CONTENT
            $table->increments('id')->nullable(false)->comment('');
			$table->string('uid', 255)->nullable(false)->comment('用户id');
			$table->string('username', 255)->nullable(false)->comment('姓名');
			$table->string('type', 50)->nullable(false)->comment('操作类型');
			$table->string('ip', 50)->nullable(false)->comment('操作者ip');
			$table->string('browser', 150)->nullable(false)->comment('浏览器');
			$table->string('system', 50)->nullable(false)->comment('操作系统');
			$table->string('url', 150)->nullable(false)->comment('url');
			$table->string('content', 255)->nullable(false)->comment('操作描述');
			$table->timestamp('created_at')->nullable()->comment('');
			$table->timestamp('updated_at')->nullable()->comment('');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('action_log');
    }
}
